#pragma once

#include "FunctionBehavior.h"

#include "DataType.h"

namespace uml {

FunctionBehavior::FunctionBehavior(const QString& umlType)
    : OpaqueBehavior(umlType) {}

void FunctionBehavior::fromJson(const QJsonObject& json, QStringList& errorList) {
    if (json.isEmpty()) {
        return;
    }

    OpaqueBehavior::fromJson(json, errorList);
}

void FunctionBehavior::toJson(QJsonObject& json) {
    OpaqueBehavior::toJson(json);
}

/// <summary>
/// hasAllDataTypeAttributes
    /// The hasAllDataTypeAttributes query tests whether the types of the attributes of
    /// the given DataType are all DataTypes, and similarly for all those DataTypes.
/// </summary>
    /// <code>
    /// result = (d.ownedAttribute->forAll(a |
    ///     a.type.oclIsKindOf(DataType) and
    ///       hasAllDataTypeAttributes(a.type.oclAsType(DataType))))
    /// </code>
bool FunctionBehavior::hasAllDataTypeAttributes(shared_ptr<DataType> d) const
{
    return false;
}

} // namespace uml
